home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Files / GetOwnerGroup / simple.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-07  |  2.5 KB  |  71 lines  |  [TEXT/MPS ]

  1. #include <Types.h>
  2. #include <memory.h>
  3. #include <Packages.h>
  4. #include <Errors.h>
  5. #include <quickdraw.h>
  6. #include <fonts.h>
  7. #include <dialogs.h>
  8. #include <windows.h>
  9. #include <menus.h>
  10. #include <events.h>
  11. #include <OSEvents.h>
  12. #include <Desk.h>
  13. #include <diskinit.h>
  14. #include <OSUtils.h>
  15. #include <resources.h>
  16. #include <toolutils.h>
  17. #include <AppleEvents.h>
  18. #include <EPPC.h>
  19. #include <GestaltEqu.h>
  20. #include <PPCToolbox.h> 
  21. #include <Processes.h>
  22. #include <Balloons.h>
  23. #include <aliases.h>
  24. #include <Folders.h>
  25. #include <StandardFile.h>
  26. #include <SegLoad.h>
  27.  
  28. typedef void (*myDrawProcPtr)(WindowPtr theWindow); 
  29. typedef void (*myClickProcPtr)(WindowPtr theWindow,EventRecord *theEvent); 
  30. typedef void (*windowSaveProc)(WindowPtr theWindow); 
  31. typedef void (*myCloseProcPtr)(WindowPtr theWindow); 
  32. typedef void (*mySizeProcPtr)(WindowPtr theWindow,short how); 
  33. typedef void (*myActivateProcPtr)(WindowPtr theWindow,Boolean active); 
  34.  
  35.  
  36. /* windowControl is the structure attached to every window I create (in the refCon */
  37. /* field) that contains all the information I need to know about the window. */
  38. /* data, procedure pointers for controlling, and anything else gets put in this */
  39. /* struct.  That makes my windows autonomous */
  40. struct windowControl {
  41.     unsigned long windowID;                                 /* master ID number  */
  42.     myDrawProcPtr drawMe;                                         /* content drawing procedure pointer */
  43.     myClickProcPtr clickMe;                                        /* content click routine */
  44.     myCloseProcPtr closeMe;                                        /* document close procedure pointer */
  45.     mySizeProcPtr sizeMe;                                            /* size procedure */
  46.     myActivateProcPtr activateMe;
  47.     AliasHandle fileAliasHandle;                            /* alias for this document */
  48.     Boolean windowDirty;
  49.     Handle generalData;                                        /* cast to whatever you need as you need it */
  50. };
  51. typedef struct windowControl windowControl, *windowCPtr, **windowCHandle;
  52.  
  53. struct AEinstalls {
  54.     AEEventClass theClass;
  55.     AEEventID theEvent;
  56.     AEEventHandlerUPP theProc;
  57. };
  58. typedef struct AEinstalls AEinstalls;
  59.  
  60. enum {kDocWindowResID = 128,kMyDocumentWindow = 1000};
  61. /* menu enums */
  62. enum {kMBarID = 128};
  63. enum {kAppleMenu = 128,kFileMenu,kEditMenu,kToolsMenu};
  64.  
  65. /* file menu enums */
  66. enum {kNewItem = 1,kOpenItem,kCloseItem,kSaveItem,kSaveAsItem,kFileBlank1,kPageSetupItem,kPrintItem,kFileBlank2,kQuitItem};
  67.  
  68. /* general purpose enums */
  69. enum {kResumeMask=1,kSampHelp=129,kAboutBox=128,kHelpString=128,kBadSystem=130};
  70.  
  71. enum {kMinHeight = 200};